<template>
  <div class="home"></div>
</template>

<script>
import HelloWorld from '@/components/HelloWorld.vue';
export default {
  name: 'HomeView',
  components: {
    HelloWorld
  },
  data() {
    return {
      a: 1
    };
  },
  computed: {
    double() {
      return this.a * 2;
    }
  },
  methods: {
    handleClick() {
      this.a++;
    },
    // 路由
    handleGoAbout() {
      this.$router.push('/about');
      // 路由信息
      console.log(this.$route);
      console.log(this.$route.query);
      console.log(this.$route.params);
    }
  },
  watch: {
    a() {
      console.log('a changed');
    }
  },
  created() {
    console.log('created');
  },
  mounted() {
    console.log('mounted');
  }
};
</script>

<style lang="less"></style>
